home *** CD-ROM | disk | FTP | other *** search
- /*
- File: 2020Recipient.h
-
- Copyright: © 1991-1994 by Apple Computer, Inc.
- All rights reserved.
-
- Part of the AOCE Sample SMSAM Package. Consult the license
- which came with this software for your specific legal rights.
-
- */
-
-
-
- #ifndef __2020RECIPIENT__
- #define __2020RECIPIENT__
-
- #ifndef __BLJSTANDARDINCLUDES__
- #include "BLJStandardIncludes.h"
- #endif
-
- #ifndef __OCEMAIL__
- #include <OCEMail.h>
- #endif
-
- #ifndef __RECIPIENT__
- #include "Recipient.h"
- #endif
-
- class T2020Letter;
-
- /***********************************|****************************************/
-
- class T2020Recipient : public TRecipient
- {
- // Constructors
- public:
- T2020Recipient(T2020Letter* letter, const OCEPackedRecipient*,
- unsigned short originalRecipientIndex,
- Boolean responsible = false,
- Boolean marked = false);
- virtual ~T2020Recipient();
-
- public:
-
- // Recipient Name/Type or CID Methods
- // ==================================
- virtual Boolean GetRecipientName (TRString& name) const;
- virtual Boolean GetRecipientType (TRString& type) const;
-
- virtual Boolean GetCID (CreationID& cid) const;
-
- // Path Information
- // ================
- virtual Boolean IsPathInfoPresent () const; // return true if the recipient has any path information
- virtual Boolean IsPathInfoOptional () const; // return true if the path info is present but not required
- virtual Boolean IsNameAndPathUnique () const; // return true if the name & path info uniquely identify a recipient
-
- virtual Boolean GetPathDNode (unsigned long& dNode) const;
-
- virtual unsigned short GetPathNameCount () const;
- virtual void GetPathNameItem (unsigned short item, TRString& nodeName) const;
-
- virtual Boolean GetDirectoryName (DirectoryName& directoryName) const;
-
- // Recipient Extension Data
- // ======================
- virtual Boolean IsAddressTypePresent () const; // return true if an address type is present
- virtual OSType GetAddressType () const;
- virtual unsigned long GetExtensionDataSize () const;
- virtual void GetExtensionData (unsigned long offset, void *buffer, unsigned long bufferSize) const;
-
- // Recpient Status
- // ===============
- virtual Boolean GetResponsible() const; // return true if responsible for this recipient, false otherwise
- virtual Boolean SetStatus ( RecipientStatusSet ); // set recipient status
- virtual RecipientStatusSet GetStatus () const; // get recipient status
-
- // For debugging purposes
- virtual ostream& DescribeSubclass( ostream& ) const;
- virtual ostream& operator >> ( ostream& ) const;
-
- // Additional functions, only usable if a T2020Recipient * is being referenced
- public:
- void SetOriginalRecipientIndex ( unsigned short index );
- unsigned short GetOriginalRecipientIndex() const;
-
- void SetResolvedRecipientIndex ( unsigned short index );
- unsigned short GetResolvedRecipientIndex() const;
-
- void SetResponsible ( Boolean responsible );
-
- // Return true if the recipient only exists in the resolved recipient list.
- Boolean GetHidden () const;
- void SetHidden ( Boolean hidden );
-
- Boolean GetOCERecipient( OCERecipient& oceRecipient ) const;
-
- #if 0
- T2020Letter* GetOwningLetter ( ) const;
- T2020HalfGateway* GetOwningHalfGateway ( ) const;
- #endif
-
- private:
- T2020Letter* fOwningLetter;
-
- #if 0
- OCEPackedRecipient* fOCEPackedRecipient;
- OCERecipient fOCERecipient;
- RecordID* fRecordID;
- RLI* fRLI;
- PackedPathNamePtr fPackedPathNamePtr; // only used if there is no packed path in the RLI itself.
- unsigned short fPathNameItemsCount;
- RStringPtr* fPathNameItems;
- #endif
-
- TDSSpec fRecipient;
-
- unsigned short fOriginalRecipientIndex;
- unsigned short fResolvedRecipientIndex;
- RecipientStatusSet fStatus;
-
- unsigned fResponsible : 1;
- unsigned fHidden : 1;
- unsigned fCheckedWhetherPathInformationIsOptional : 1;
- unsigned fIsPathInfoOptional : 1;
- unsigned fCheckedWhetherRecipientNameIsUnique : 1;
- unsigned fRecipientNameIsUnique : 1;
- };
-
- /***********************************|****************************************/
-
- #endif // __2020RECIPIENT__
-
-